/*
	ArmorReflective.h
	(c)2004 Palestar Inc, Richard Lyle
*/

#ifndef ARMORREFLECTIVE_H
#define ARMORREFLECTIVE_H

#include "Game/GadgetArmor.h"

//----------------------------------------------------------------------------

class ArmorReflective : public GadgetArmor
{
public:
	DECLARE_WIDGET_CLASS();

	// NounGadget interface
	int	addValue() const
	{
		return 6000;
	}
	Type type() const
	{
		return ARMOR;
	}
	int buildTechnology() const
	{
		return 25;
	}
	int	buildCost() const
	{
		return 900;
	}
	dword buildFlags() const
	{
		return NounPlanet::FLAG_METALS;
	}
	int	buildTime() const
	{
		return 660;
	}
	// GadgetArmor interface
	bool canDeflect( dword nType ) const
	{
		return (nType & (DAMAGE_KINETIC | DAMAGE_ENERGY | DAMAGE_EMP)) != 0;
	}
	int	maxArmor() const
	{
		return (modifier() * (33250 + (9258 * level()))) * enhancementModifier( enhancementSystem(), NounEnhancement::MT_INCREASE );
	}// Add 2000 -JBUD-
	float damageModifier( dword nType ) const
	{
		if ( nType & (DAMAGE_ENERGY|DAMAGE_EMP) )
			return 0.2f;		// energy/emp damage is less effective against this armor type
		if ( nType & (DAMAGE_KINETIC) )
			return 1.35f;		// kinetic damage is more effective
		return 1.0f;
	}
	int	repairRate() const
	{
		return maxArmor() / 915;
		//return 75; //Returned to leveled Armor regen -JBUD-
	}
};

//----------------------------------------------------------------------------



#endif

//----------------------------------------------------------------------------
// EOF
